/*
 * qwscontroldock.cpp
 *
 *  Created on: Jan 16, 2009
 *      Author: rex
 */

#include "qwscontroldock.h"

QWSControlDock::QWSControlDock(QWidget *parent)
: QWidget(parent)
{
	play = new QPushButton(QIcon(":resources/icons/play.png"), tr("Play"));
	pause = new QPushButton(QIcon(":resources/icons/pause.png"), tr("Pause"));
	stop = new QPushButton(QIcon(":resources/icons/stop.png"), tr("Stop"));

	layout = new QHBoxLayout();

	layout->addWidget(play);
	layout->addWidget(pause);
	layout->addWidget(stop);

	setLayout(layout);

	setActions();
}

void QWSControlDock::setActions() {
	connect(play, SIGNAL(clicked()), this, SLOT(playPressed()));
	connect(pause, SIGNAL(clicked()), this, SLOT(pausePressed()));
	connect(stop, SIGNAL(clicked()), this, SLOT(stopPressed()));
}

void QWSControlDock::playPressed() {
	emit playStation();
}

void QWSControlDock::pausePressed() {
	emit pauseStation();
}

void QWSControlDock::stopPressed() {
	emit stopStation();
}


QWSControlDock::~QWSControlDock() {
	// TODO Auto-generated destructor stub
}
